<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>每日限额管理</title>

    <link href="../plugin/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../plugin/bootstrap-table-1.11.1/bootstrap-table.min.css" rel="stylesheet"/>
    <link href="../plugin/sweetalert-6.6.2/sweetalert2.min.css" rel="stylesheet"/>
    <link href="../plugin/bootstrap-3.3.7/plugin/file_input/fileinput.min.css" rel="stylesheet"/>
    <link href="../plugin/bootstrap-3.3.7/plugin/datatimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet"/>
    <link href="../plugin/jquery-zoomify/zoomify.min.css" rel="stylesheet"/>

    <script src="../plugin/jquery-3.2.1/jquery-3.2.1.min.js"></script>
    <script src="../plugin/bootstrap-3.3.7/js/bootstrap.min.js"></script>
    <script src="../plugin/bootstrap-3.3.7/plugin/file_input/fileinput.min.js"></script>
    <script src="../plugin/bootstrap-3.3.7/plugin/file_input/local_zh.js"></script>
    <script src="../plugin/bootstrap-3.3.7/plugin/datatimepicker/bootstrap-datetimepicker.min.js"></script>
    <script src="../plugin/bootstrap-3.3.7/plugin/datatimepicker/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="../plugin/bootstrap-table-1.11.1/bootstrap-table.min.js"></script>
    <script src="../plugin/bootstrap-table-1.11.1/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="../plugin/sweetalert-6.6.2/sweetalert2.min.js"></script>
    <script src="../plugin/jquery-3.2.1/jquery.formautofill.min.js"></script>
    <script src="../plugin/jquery-zoomify/zoomify.min.js"></script>
    <script src="../plugin/jquery-3.2.1/jquery.serializejson.js"></script>
    <script src="../plugin/soul/utils3.js"></script>
    <script src='../base/base.js'></script>
</head>
<body>

<script>
    $(function () {
        var resp = AjaxUtil.isLogin();
        if (!resp) return;
        var module = 'day_limit';

        // 工具条配置
        var toolbar = {
            default: [false, false, true, false],// back;add;edit;remove
            dialog: [50, 2, 9],//对话框参数:模态框宽度(百分比);表单标题宽度;表单输入框宽度
            extra: []
        };

        // 表单内容配置
        var formElement = [{
            action: [false, true],
            type: 'hidden', // 表单类型
            name: 'dayLimitId', // 字段名称
        }, {
            action: [true, true],
            type: 'text',
            label: '限额数量',
            name: 'amount',
        }];

        var bootstrapTable = {
            columns: [{
                radio: true
            }, {
                field: 'dayLimitId',
                title: '编号',
                align: 'center',
            }, {
                field: 'coinType',
                title: '币种类型',
                formatter: function (value, row, index) {
                    if (value == 1) {
                        return 'BHPC';
                    } else if (value == 2) {
                        return '其他币种';
                    } else {
                        return '未知';
                    }
                }
            },{
                field: 'infoStatus',
                title: '认证等级',
                formatter: function (value, row, index) {

                    if (value == 0) {
                        return '未认证';
                    } else if (value == 1) {
                        return '一级认证';
                    } else if (value == 2) {
                        return '二级认证';
                    } else if (value == 3) {
                        return '三级认证';
                    } else {
                        return '未知';
                    }
                }
            },{
                field: 'amount',
                title: '每日限额',
                align: 'center',
                formatter: function (value, row, index) {
                    var suffix = '未知'
                    if (row.coinType == 1) {
                        suffix ='BHPC';
                    } else if (row.coinType == 2) {
                        suffix ='BTC';
                    }
                    return value+suffix
                }
            }]
        };

        day_limit = SingleTablePageCreateUtil.createInstance(module, null, toolbar, formElement, bootstrapTable);

    });
</script>
</body>

</html>